{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": 2,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import sympy as sp\n",
        "sp.init_printing()"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 3,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "eps = sp.Symbol(\"epsilon\")\n",
        "lam = sp.Symbol(\"lambda\")"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 4,
      "metadata": {
        "collapsed": false
      },
      "outputs": [
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAADUAAAAyBAMAAAAOzY77AAAALVBMVEX///8AAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAOrOgAAAADnRSTlMA74lUMhCrmXbNZkQiuwWY\nBOwAAAAJcEhZcwAADsQAAA7EAZUrDhsAAADgSURBVDgRY5B794gBC2B6906AQdjFFYsUA6uLswCD\nCDYZkBgLEXKGAZi6IfpY0/NwyjEw9FFHjlUtC+FONDM3bkDyA6ocz2Nk/6HKsT1XWoDLTMaroTjN\n5CvAbSZnAm45blEGVrh9ZXLTFoCUwsC2rga4HEwMhSYmjlA0QDmj+jBChVkUKIQ9XMLKnuKUY+Ag\nVi4obQGypcj6uKWRZRhQzDxngFsur0gLRRLZTNlQ1DyGLPccRReqfdPwyG0MYEAxFNlM7owVyDrZ\nE18i5U1kGRgbe1hDZAdADl8ZiadsBQD72Tr8i9MKrQAAAABJRU5ErkJggg==\n",
            "text/latex": [
              "$$\\left[\\begin{matrix}1 & \\epsilon\\\\\\epsilon & 1\\end{matrix}\\right]$$"
            ],
            "text/plain": [
              "\u23a11  \u03b5\u23a4\n",
              "\u23a2    \u23a5\n",
              "\u23a3\u03b5  1\u23a6"
            ]
          },
          "execution_count": 4,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "m = sp.Matrix([[1, eps], [eps, 1]])\n",
        "m"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": 5,
      "metadata": {
        "collapsed": false
      },
      "outputs": [
        {
          "data": {
            "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbEAAAAcBAMAAAAdC5wGAAAAMFBMVEX///8AAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAv3aB7AAAAD3RSTlMAIqvdzbtmMu+JdkSZ\nEFSzbGo9AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAGdklEQVRYCdVXa2xURRT+brfd2+3u3W5qQoxp\nZHk1ikGeKoINK5SAxEgllhADZlVUIGor6i9/bFWKT8IKRFILcgNBETWsoqEkJt0gqLzCtcEHJqTL\nD36oQCuP8iiwnjNzX7vcQldJ0ZN05pvvnDMz3z0ze2+Bf2OBXfs909fMNTz5/w/5HoZ6bTYQKYp5\n8f9p7pWc3Y1GIpJDyIEvov7lQfcfVVb4UmptTs5EDEzlEHLgSyk9HnT/UcFowWsVG3kpnfmE9Icv\n5cX18/D9gtfbk58xIY/QHheET8/jxfDniBcrOTOx94A+eDZM46D5EwEfPfCKSScHT43npSlDsoOH\nzpbk4gccp5JfikDacUpUn+J+TR6t7KtrAPxXO6MyUeapc9J5E8jhME926/Il08ctJVeLdFNXliaY\niEJZIimnVU8CN8fEWHvNoa8Q8qzjM5GvloA/TY3b2hFgVXe5OYHDyyxKJFqD8oyFcvqqnJE12Pg9\nisHLOsqULhoOjAL1SSvK7BVS5j8vB7McX2nGwYyCyWCDZP6wHGVc1u3YZo1lPwJ4k9AWw6TDugTt\nO+xTIBJNN9qsQIu4Wr8b+DCQoghHGe6mIStLjMrLZGXqKUm6lCXyFnzpxFGTsZUpFyjzoRPzcid8\nHRjZQGvpJm0pg6OHE21baaM+gP1Qoos5zqVsFw2FspiyDb98wV5pQtlpiV3KFlh+s1+ezZrIVoYp\nQGk225UbOdMQyopHmbSHMk607UEb9QmUGOJJupRtojxWtiVeeQZHL+Crt3+/H5ULB4GVlXXj0GYK\n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g8PHWQ2fhKWBYcvsiD1prISnerh8V/nzGz2FB6luM4INU7NQredroKvGijRReJYWkAbvrri\nU9rPXmArsB449gzaP3lheApVcWYqnqcJXBZsml4359xcYqhYX36kC2W7XAFXhQOktzTVW5SprDd3\nPm/XTDiO2O6wFG6PCwN8DMm4myHQNZsBWCtjQsneYn/szeHNazkKnFnly8U759qso0y7dO1ojlin\nxGWg2ij769tquj2ffLnYwwKBo8wf7Vtq5WYr7k4LXM/e70wWd+A/QI4yX0Oh6QcLTejX+A338HIb\nJgILC143nC445UYkKLWFr/pn4Sk3ICNk3IBF+23JvwGsOdNRNh0gkwAAAABJRU5ErkJggg==\n",
            "text/latex": [
              "$$\\operatorname{PurePoly}{\\left( - \\epsilon^{2} + \\lambda^{2} - 2 \\lambda + 1, \\lambda, domain=\\mathbb{Z}\\left[\\epsilon\\right] \\right)}$$"
            ],
            "text/plain": [
              "PurePoly(lambda**2 - 2*lambda - epsilon**2 + 1, lambda, domain='ZZ[epsilon]')"
            ]
          },
          "execution_count": 5,
          "metadata": {},
          "output_type": "execute_result"
        }
      ],
      "source": [
        "m.charpoly(lam)"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "Observe the occurrence of $(1-\\epsilon^2)$ above."
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.5.1+"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}